﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="User.aspx.cs" Inherits="System_User" %>
<%@ Register Src="../usercontrol/PageNavigator.ascx" TagName="PageNavigator" TagPrefix="uc1" %>
<html>
<head runat="server">
    <title>用户管理</title>
    <link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../js/changerows.js"></script>
    <style type="text/css">
    .titlediv{float: left; padding: 5px 2px;width:100%;}
    .AddLnk{float:right;background:url(../images/add.gif) no-repeat 2px center;padding-left:20px;margin-right:5px;}
    .LeftTitle{font-size:14px;float:left;color:Green;}
    </style>
</head>
<body style="margin-top:2px;">
    <form id="form1" runat="server">
        
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="31" style="height: 25px">
                    <img src="../images/module.gif" width="20"  alt="" /></td>
                <td style="width: 242px; height: 25px;">
                    <asp:Label ID="lblPath" runat="server"></asp:Label></td>
                <td width="80%" align="right">
                    <img src="../images/search.gif" alt="搜索" width="16" height="16" />用户编号：<asp:TextBox
                        ID="txtContent" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text="搜索" CssClass="submit" OnClick="btnSearch_Click"  /></td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <asp:GridView ID="gvData" runat="server" AutoGenerateColumns="false" CssClass="gridview" EmptyDataText="暂无用户信息"
            Width="99%" RowStyle-HorizontalAlign="center" >
            <RowStyle Height="23px" />
            <Columns>
                <asp:TemplateField HeaderText="序号">
                    <ItemTemplate>
                        <%#Container.DataItemIndex + 1 %>
                    </ItemTemplate>
                    <ItemStyle Width="30px" />
                </asp:TemplateField>
                <asp:BoundField DataField="userbh" HeaderText="用户编号" />
                <asp:BoundField DataField="username" HeaderText="用户名" />
                <asp:BoundField DataField="realname" HeaderText="真实姓名" />
                <asp:BoundField DataField="deptname" HeaderText="所属部门" />
                <asp:BoundField DataField="role" HeaderText="所属角色" />
                <asp:BoundField DataField="IP" HeaderText="IP限制" />
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="lnkbtnEdit" CssClass="lnkbtn" runat="server" OnClick="lnkbtnEdit_Click" CommandArgument='<%#Eval("userid") %>'>修改</asp:LinkButton>
                        <asp:LinkButton ID="lnkbtnDel" CssClass="lnkbtn" runat="server" OnClientClick="return confirm('确定要删除该用户吗?')" OnClick="lnkbtnDel_Click" CommandArgument='<%#Eval("userid") %>'  Enabled="false">删除</asp:LinkButton>
                     
                    </ItemTemplate>
                    <ItemStyle Width="150px" />
                </asp:TemplateField>
            </Columns>
            <RowStyle HorizontalAlign="Center" />
            <EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
        </asp:GridView>
        <table width="99%" border="0" cellspacing="0" cellpadding="0">
            <tr>
            <td><uc1:PageNavigator ID="PageNavigator1" runat="server" DataId="gvData" ConnectionString="connstr" PageSize="20" /></td>
                <td align="right" style="height: 5px">
                   
                    <asp:Button ID="btnAdd" runat="server" Text="添加" CssClass="submit" CausesValidation="False"
                        OnClick="btnAdd_Click" />
                </td>
            </tr>
        </table>
     
      
        
        
        <asp:HiddenField ID="hidDeptid" runat="server" />
        <asp:HiddenField ID="HidModuId" runat="server" />
    </form>
    <script type="text/javascript">
    function setPermission(pid)
    {
        openwin("Purview.aspx?id=" + pid + "&t=2",600,600,50);
        return false;
    }
    </script>
</body>
</html>
<script language="javascript"><!--
//senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
 senfe("gvData","#ECF9FC","#FFFFFF","#D6F1F8");
--></script>